package com.prd.service;

import com.prd.dto.AttendanceOutsideDTO;
import com.prd.model.AttendanceOutsideDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.prd.util.JsonData;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

/**
 * <p>
 * 外勤管理表 服务类
 * </p>
 *
 * @author lizhaoyi
 * @since 2023-10-18
 */
public interface AttendanceOutsideService extends IService<AttendanceOutsideDO> {

    /**
     * 申请外勤并启动工作流
     * @param attendanceOutsideDTO
     * @return
     */
    JsonData askForOutside(AttendanceOutsideDTO attendanceOutsideDTO);

    /**
     * 分页查询外勤记录
     * @param page
     * @param size
     * @param userId
     * @return
     */
    Map<String,Object> page(int page, int size,String userId);

    /**
     * 查看工作流程图
     * @param resp
     * @param processId
     */
    void showProcessPic(HttpServletResponse resp, String processId) throws IOException;

    /**
     * 查询考勤详情
     * @param id
     * @param userId
     * @return
     */
    JsonData getDetail(int id, String userId);
}
